package com.belinked_client.public_class;

import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map;

import org.json.JSONObject;

import android.util.Log;

import com.belinked_client.apllication.comClientApllication;

public class sent {
	private Map map ;
	private PrintWriter mPrintWriter = null;
	public sent(PrintWriter mprintWriter)
	{
	   mPrintWriter = mprintWriter;
       map = new HashMap();
	}
	void sent_msg(String Key,String Value)
	{
		map.put(Key, Value);
	}
	void sent_ok()
	{
		try {
			JSONObject jsonObject = new JSONObject(map);
			String str = jsonObject.toString() + "\n";
			Log.d("in sent ", jsonObject+"");
			mPrintWriter.print(str);
			mPrintWriter.flush();
		} catch (Exception e) {

		}
	}
//	try {
//		Log.d("!!!!!!!!!!!!!!room_chat_main", "qurery friend");
//		Map map = new HashMap();
//		map.put("action", "inviteFriend");
//		map.put("un", usd_name);
//		map.put("ui", usd_id);
//		map.put("ri", room_id);
//		map.put("rn", room_name);
//		map.put("fi", friend_id[arg2-1]);
//		JSONObject jsonObject = new JSONObject(map);
//		String str = jsonObject.toString() + "\n";
//		room_chatPrintWriter.print(str);
//		room_chatPrintWriter.flush();
//	} catch (Exception e) {
//
//	}
}
